# Dockerfile
FROM openjdk:17-jdk
MAINTAINER pepper
# 创建目录
RUN mkdir -p /home/app
# 拷贝项目jar
COPY ./target/k8s-demo1-v1.0.0.jar /home/app/k8s-demo1.jar
# 执行命令启动jar
ENTRYPOINT ["java","-jar","/home/app/k8s-demo1.jar"]
# 暴露端口
EXPOSE 9092

# 在工程目录下运行：
# docker build -t spring-demo1:v1.0.0 .

# docker build -t registry.k8s-master:32000/k8s-demo1:v1.0.0 .
# docker push  registry.k8s-master:32000/k8s-demo1:v1.0.0